package com.mongoplus.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mongoplus.annotation.ID;
import com.mongoplus.annotation.collection.CollectionField;
import com.mongoplus.annotation.collection.CollectionName;
import com.mongoplus.enums.FieldFill;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@CollectionName("collection")
public class User {
    @ID
    private String id;
//    @CollectionField(fill = FieldFill.INSERT)
    private String username;
    private String password;
    private String emile;
    private Integer age;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday;
}
